﻿//------------------------------------------------------------------------------
// <copyright file="RpcEventArgs.cs" company="Microsoft">
//     Copyright (c) Microsoft Corporation.  All rights reserved.
// </copyright>
//------------------------------------------------------------------------------

namespace Microsoft.Internal.GamesTest.Rpc.Client
{
    using System;

    /// <summary>
    /// A class that represents RPC events data.
    /// </summary>
    [Serializable]
    public class RpcEventArgs : EventArgs
    {
        /// <summary>
        /// Initializes a new instance of the RpcEventArgs class.
        /// </summary>
        /// <param name="eventName">The name of the event from the server.</param>
        /// <param name="archive">The RpcArchive object received from the server.</param>
        public RpcEventArgs(string eventName, RpcArchive archive)
        {
            if (eventName == null)
            {
                throw new ArgumentNullException("eventName");
            }

            if (archive == null)
            {
                throw new ArgumentNullException("archive");
            }

            this.EventName = eventName;
            this.Archive = archive;
        }

        /// <summary>
        /// Gets the RpcArchive object received from the server.
        /// </summary>
        public RpcArchive Archive { get; private set; }

        /// <summary>
        /// Gets the name of the event from the server.
        /// </summary>
        public string EventName { get; private set; }
    }
}
